import 'package:flutter/material.dart';
import 'package:flutter_color_plugin/flutter_color_plugin.dart';

class NoData extends StatelessWidget {
  final String title;
  final String imageUrl;
  final TextStyle textStyle;

  const NoData(
      {Key key,
      this.title = '还没有相关订单',
      this.imageUrl = 'images/noData.png',
      this.textStyle})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Container(
            margin: EdgeInsets.only(bottom:12),
            child: Image.asset('$imageUrl'),
          ),
          DefaultTextStyle(
            style: TextStyle(color: ColorUtil.color("#FF999999"), fontSize: 13),
            child: Text(
              '$title',
              style: textStyle,
            ),
          )
        ],
      ),
    );
  }
}
